package future优化.回调版的future;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Future;

/**
 * @author ZhuQi
 * @ClassName FutureMap
 * @Date 2022/9/5 14:08
 * @Version 1.0
 * @Description FutureMaps
 */
public class FutureMap {

    private static final ConcurrentHashMap<Long, Future<String>> futureMap = new ConcurrentHashMap<>(16);

    public static void setFutureMap(Long t, Future f) {
        futureMap.put(t, f);
    }

    public static Future<String> getFutureMap(Long t) {
        return futureMap.get(t);
    }
}
